/files/{file_path}

File upload service

/files/{file_path}

URL ในการเข้าถึงไฟล์ ให้ต่อด้วย path file ที่ได้ไปจากตอน upload, asset ที่ไม่ public ต้องต่อด้วย sig ใน query param เสมอ

Path Parameters
  • file_path
    required
    string
Query Parameters
  • sig
    string
Responses
  • 200

    The request has succeeded.

GET/files/{file_path}
Shell cURL
curl --request GET \
  --url https://dpt-api.finema.dev/files/__FILE_PATH__
0.0.0
OAS 3.0.0

Common API

Client Libraries
Shell
Ruby
Node.js
PHP
Python
C
More
Authentication
Bearer Authentication (BearerAuth)

File upload service

/files

Upload file to common storage : is_public = ตั้งค่าเป็น public access (ไม่ต้องใช้ sig ในการเข้าถึง)

Body
multipart/form-data
file
required
string binary

binary data, used to describe files

is_public
required
boolean
Responses
  • 200

    The request has succeeded.

POST/files
Shell cURL
curl --request POST \
  --url https://dpt-api.finema.dev/files \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: multipart/form-data'
{
  "url": "https://dpt-api.finema.dev/files/xxx/d7d4bcc9-0424-4c4f-a0a0-073ceea5757d.pdf?sig=lfhVvVF3VFvfpLvmfO5VFoi46vfdKipL",
  "file_name": "d7d4bcc9-0424-4c4f-a0a0-073ceea5757d.pdf",
  "prefix": "xxx",
  "path": "files/xxx/d7d4bcc9-0424-4c4f-a0a0-073ceea5757d.pdf",
  "size": 15475,
  "name": "original_my_file_name.png",
  "mime_type": "png",
  "sig": "c1397hkljhlih38981hjkhlih3io9o7901hjljk189803il1h97"
}